//
//  ModuleProtocol.swift
//  
//
//  Created by tank on 2021/9/29.
//

import Foundation
import LibService

/// module protocol
public protocol ModuleProtocol: AnyObject {
    /// module type
    static var type: String { get }
    
    var type: String { get }
    
    /// module id
    var id: String? { get }
    
    
    init(id: String?)
    
    func page(type: String?,
              id: String?,
              config: PageConfig?,
              params: [String: Any]?,
              hash: String?) -> PageProtocol?
    
    func removePage(type: String, id: String?)
    
    func handle(type: String?, params: [String: Any]?,
                completion: RouterServiceProtocol.RouteCompletion?)
}

